; load functions and procedures
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/wrf/WRFUserARW.ncl"

begin

    ; filename = systemfunc("ls /public/users/wrf/wrfout/2012042712/wrfout_d01_*")
    filename = systemfunc("ls /public/users/wrf/wrfout/2012052900/geogrid/geo_em.d01.nc")
    a = addfile(filename, "r")

    ; Output on screen. Output will be called "plt_Surface1"
    type = "pdf"
    wks = gsn_open_wks(type,"plt_Surface1")
    ; Set basic resources
    res                 = True
    res@MainTitle       = "GEOGRID FIELDS"
    ;res@Footer         = False
    res@cnFillOn        = False
    res@gsnSpreadColors = True
    res@cnLevelSelectionMode = "ManualLevels"
    res@cnMinLevelValF  = 2000.
    res@cnMaxLevelValF  = 8000.
    res@cnLevelSpacingF = 500.
    res@mpOutlineOn     = True
    res@mpOutlineBoundarySets = "AllBoundaries"

    ter = a->HGT_M(0,:,:)
    contour = wrf_contour(a, wks,ter,res)

    pltres              = True  ; Set plot options
    mpres               = True  ; Set map options
    plot = wrf_map_overlays(a, wks, (/contour/), pltres, mpres)  ; Plot the data over a map background

end
